home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / spwno413.zip / SOURCE.ZIP / INIT.C < prev    next >
C/C++ Source or Header  |  1991-10-29  |  973b  |  29 lines

  1. /********************************************************************/
  2. /*   SPAWNO v4.0   EMS/XMS/disk swapping replacement for spawn...() */
  3. /*   (c) Copyright 1991 Ralf Brown  All Rights Reserved         */
  4. /*                                    */
  5. /*   May be freely copied provided that this copyright notice is    */
  6. /*   not altered or removed.                        */
  7. /********************************************************************/
  8.  
  9. #include "_spawno.h"
  10.  
  11. void _Cdecl init_SPAWNO(const char *overlay_path, int swap_types)
  12. {
  13.    const char *swapdirs ;
  14.  
  15.    swapdirs = getenv("SWAPDIR") ;
  16.    if (!swapdirs && overlay_path && *overlay_path)
  17.       swapdirs = overlay_path ;
  18.    if (!swapdirs)
  19.       swapdirs = getenv("TEMP") ;
  20.    if (!swapdirs)
  21.       swapdirs = getenv("TMP") ;
  22.    if (swapdirs)
  23.       ___spawn_swap_dirs = swapdirs ;
  24.    __spawn_ext = (swap_types & SWAP_EXT) != 0 ;
  25.    __spawn_ems = (swap_types & SWAP_EMS) != 0 ;
  26.    __spawn_xms = (swap_types & SWAP_XMS) != 0 ;
  27. }
  28.  
  29.